package 补充;

import java.util.Random;

public class Random类 {//伪随机数
    public static void main(String[] args) {
        Random r = new Random();
        System.out.println("生成3个int类型随机数");
        for (int i = 0; i < 3; i++) {
            System.out.println(r.nextInt(3));
        }
        System.out.println("生成3个0~100.0double类型随机数");
        for (int i = 0; i < 3; i++) {
            System.out.println(r.nextDouble(3)*100);
        }
        System.out.println("生成3个double类型随机数");
        for (int i = 0; i < 3; i++) {
            System.out.println(r.nextInt(3));
        }

    }
}
